package org.smartercontext.contextmger.fixedgatherers;

import java.util.List;

import org.smartercontext.contextmger.contextsphere.ContextManagerController;
import org.smartercontext.contextmger.converters.RDFConverter;

import com.hp.hpl.jena.rdf.model.Model;

public class BuyerPreferences implements IBuyerPreferences{

	@Override
	public void savePreferences(List<String> wishes, List<String> productsSeen,
			List<String> productsRanked, String username) {
		
		try {
			Model usermodel = ContextManagerController.getUsermodel(username);
			RDFConverter rdfConv = new RDFConverter();
			Model userModelModify = rdfConv.writeBuyerPreferences
					(wishes, productsSeen, productsRanked, usermodel, username);
			ContextManagerController.integrateContext(userModelModify, username);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
	}

}
